<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>{:lang('USER_INDEXADMIN_INDEX')}</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('user/AdminBalance/log')}">

        {:lang('Keyword')}
        <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
               placeholder="用户名/昵称/邮箱/手机">

        记录类型
        <select name="cycle_type" id="input-cycle_type" class="form-control">
            <option value="0"  <if condition="$cycle_type eq 0"> selected </if>>不限</option>
            <option value="1" <if condition="$cycle_type eq 1"> selected </if> >后台修改</option>
            <option value="2"  <if condition="$cycle_type eq 2"> selected </if>>提现</option>
            <option value="3"  <if condition="$cycle_type eq 3"> selected </if>>内转</option>
        </select>


        <input type="submit" class="btn btn-primary" value="{:lang('Search')}"/>
        <a class="btn btn-danger" href="{:url('user/AdminBalance/log')}">{:lang('Clear')}</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>{:lang('USERNAME')}</th>
                <th>{:lang('MOBILE')}</th>
                <th>申请余额</th>
                <th>申请前余额</th>
                <th>类型</th>
                <th>状态</th>
                <th>操作时间</th>
                <th>描述</th>
                <th>备注</th>
                <th>操作</th>

            </tr>
            </thead>
            <tbody>
            <php>
                $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
            </php>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.user.mobile?$vo.user.mobile:($vo.user.email?$vo.user.email:'') }
                    </td>
                    <td>{$vo.user.mobile}</td>
                    <td>{$vo.change}</td>
                    <td>{$vo.balance}</td>
                    <td>
                        <switch name="vo.type">
                            <case value="1">
                                <span class="label label-danger">后台操作</span>
                            </case>
                            <case value="2">
                                <span class="label label-success">提现</span>
                            </case>
                            <case value="3">
                                <span class="label label-warning">内转</span>
                            </case>
                        </switch>
                    </td>

                    <td>
                        <switch name="vo.status">
                            <case value="1">
                                <span class="label label-default">待审核</span>
                            </case>
                            <case value="2">
                                <span class="label label-success">同意</span>
                            </case>
                            <case value="3">
                                <span class="label label-danger">拒绝</span>
                            </case>

                        </switch>
                    </td>

                    <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                    <td>{$vo.description}</td>
                    <td>{$vo.remark}</td>

                    <td>
                        <if condition="$vo.status eq 1">
                            <a class="btn btn-xs btn-success js-ajax-dialog-btn"
                               href="{:url('adminBalance/applyPost',array('id'=>$vo['id'],'status'=>2))}"
                               data-msg="确定要同意审核吗？同意后将扣除对应金额">同意</a>

                            <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
                               href="{:url('adminBablace/applyPost',array('id'=>$vo['id'],'status'=>3))}"
                               data-msg="确定要拒绝吗">拒绝</a>
                        </if>
                    </td>

                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
